package com.cragon.listener;

/**
 * @Description: 事件源产生对象
 * @Author: ZHOUHAILONG
 * @Date: 2020年07月31日 14:50
 */
public class EventSource implements OnClickListener {
	public Button testOnClick() {
		Button button = new Button();
		button.setClickListener(this);
		return button;
	}

	@Override
	public void click(ClickEvent clickEvent) {
		System.out.println("The event of click: " + clickEvent.getId());
	}

	@Override
	public void doubleClick(ClickEvent clickEvent) {
		System.out.println("The event of double click: " + clickEvent.getId());
	}
}
